package edu.cs.networkmonitor.devices;


public abstract class BaseSource {

	boolean _lastStatus = true;
	String _sourceName;
	String _sourceDescription = "";
	int _time;
	String[] _emails;
	
	public abstract boolean connect();
	public abstract String getEmailSubject();
	public abstract String getEmailBody();
	
	public boolean getDeviceStatus() {
		return _lastStatus;
	}

	public String getSourceName() {
		return _sourceName;
	}

	public String getDeviceDescription() {
		return _sourceDescription;
	}

	public String[] getEmailList() {
		return _emails;
	}

	public int getTime() {
		return _time;
	}

	public void setTime(Integer freq) {
		_time = freq;
	}

	public boolean getStatus() {
		return _lastStatus;
	}

	public void setEmail(String emails) {
		if(emails != null && !emails.isEmpty())
			_emails = emails.split(",");
		else
			_emails = new String[0];
	}

	public void setDescription(String desc) {
		_sourceDescription = desc;
	}
}
